<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String BASE_PATH = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>企业风险榜单</title>
    <link rel="stylesheet" href="${BASE_PATH}static/css/commen.css"/>
    <link rel="stylesheet" href="${BASE_PATH}static/css/SuperSlide.css"/>
    <link rel="stylesheet" href="${BASE_PATH}static/css/public.css">
    <link rel="stylesheet" href="${BASE_PATH}static/css/businessRisk.css"/>
</head>
<body>
<div class="g_coun_head">
    <div class="g_coun_head_main clearfix">
        <a class="g_c_h_m_logo fl" href="${BASE_PATH}index.jsp"></a>
        <ul class="g_c_h_m_lists fl">
            <li><a href="${BASE_PATH}index.jsp">首页</a></li>
            <li class="active"><a href="${BASE_PATH}businessRisk.jsp">企业风险榜单</a></li>
            <li><a href="${BASE_PATH}focus.jsp">企业风险聚焦</a></li>
        </ul>
        <div class="g_c_h_m_user fr">
            <span class="busRis_sear fl">
                <input type="text" class="busRis_inpSear fl" placeholder="请输入企业名、人名或其他关键词">
                <input type="button" class="busRis_btnSear fl" value="查处罚">
            </span>
            <a href="" class="g_c_h_m_login fl">登录</a>
            <a href="" class="g_c_h_m_registe fl active">免费注册</a>
        </div>
    </div>
    <p class="g_coun_h_shandow"></p>
</div>

<div class="busRis-contain">
    <input id="spage" type="hidden">
    <div class="busRis_nav">
        <span>
            <span class="icon-cri fl"></span>
            <span class="icon-line icon-lineWid80 fl"></span>
        </span>
        <div class="busRis_navOuter busRisActive fl">
            <span class="icon-nav icon-nav1 fl"></span>
            <span class="busRis_navFont fl">总体概况</span>
        </div>
        <span class="icon-line icon-lineWid100 fl"></span>
        <div class="busRis_navOuter fl">
            <span class="icon-nav icon-nav2 fl"></span>
            <span class="busRis_navFont fl">地理区域榜</span>
        </div>
        <span class="icon-line icon-lineWid100 fl"></span>
        <div class="busRis_navOuter fl">
            <span class="icon-nav icon-nav3 fl"></span>
            <span class="busRis_navFont fl">行业分类榜</span>
        </div>
        <span class="icon-line icon-lineWid100 fl"></span>
        <div class="busRis_navOuter fl">
            <span class="icon-nav icon-nav4 fl"></span>
            <span class="busRis_navFont fl">行政单位榜</span>
        </div>
        <span class="icon-line icon-lineWid90 fl"></span>
        <span class="icon-cri icon-cri_right fl"></span>
    </div>
    <div class="busRis_one">
        <div class="busRis_summary">
            <p class="busRis_smaTitle">
                <span class="leftRed mar20 fl"></span>
                <span class="fl">风险概要</span>
            </p>

            <div class="busRis_smaDetS">
                <div class="busRis_smaDet busRis_smaDetBg1 fl">
                    <p class="busRis_smaDetT">累计处罚单位（个）</p>
                    <p class="busRis_smaDetNum" id="punishnum"></p>
                </div>
                <div class="busRis_smaDet busRis_smaDetBg2 fl">
                    <p class="busRis_smaDetT">累计处罚金额（元）</p>
                    <p class="busRis_smaDetNum" id="punishmoney"></p>
                </div>
                <div class="busRis_smaDet busRis_smaDetBg3 fl">
                    <p class="busRis_smaDetT">全国近7天新增处罚数量（个）</p>
                    <p class="busRis_smaDetNum" id="punishnumweek"></p>
                </div>
                <div class="busRis_smaDet busRis_smaDetBg4 fl">
                    <p class="busRis_smaDetT">全国近30天新增处罚数量（个）</p>
                    <p class="busRis_smaDetNum" id="punishnummonth"></p>
                </div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="busRis_riskList">
            <p class="busRis_smaTitle">
                <span class="leftRed mar20 fl"></span>
                <span class="fl">综合风险TOP榜单</span>
            </p>

            <div class="busRis_riskListDet">
                <div class="busRis_borB">
                    <div class="busRis_riskListDet_Map busRis_borR fl">
                        <p class="busRis_riskList_titP">
                            <span class="busRis_riskList_tit">全国地理区域处罚统计</span>
                        </p>
                        <div class="busRisList_Map fl" id="busRisList_Map">
                        </div>
                    </div>
                    <div class="busRis_riskListDet_Map fl">
                        <p class="busRis_riskList_titP">
                            <span class="busRis_riskList_tit">全国行政处罚类型惩戒占比</span>
                        </p>

                        <div class="busRisList_Map fl" id="busRisList_Ring">
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div class="busRis_borB">
                    <div class="busRis_riskListDet_Map busRis_borR fl">
                        <p class="busRis_riskList_titP">
                            <span class="busRis_riskList_tit">全国行业分布处罚TOP10</span>
                        </p>

                        <div class="busRisList_Map fl" id="busRisList_line2">
                        </div>
                    </div>
                    <div class="busRis_riskListDet_Map fl">
                        <p class="busRis_riskList_titP">
                            <span class="busRis_riskList_tit">全国行政单位处罚TOP10</span>
                        </p>

                        <div class="busRisList_Map fl" id="busRisList_line1">
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
                <div>
                    <div class="busRis_riskListDet_Map busRis_borR fl">
                        <p class="busRis_riskList_titP">
                            <span class="busRis_riskList_tit">全国企业处罚综合TOP10</span>
                        </p>

                        <div class="busRisList_Map fl" id="busRisList_cylindrical1">
                        </div>
                    </div>
                    <div class="busRis_riskListDet_Map fl">
                        <p class="busRis_riskList_titP">
                            <span class="busRis_riskList_tit">上市公司处罚综合TOP10</span>
                        </p>

                        <div class="busRisList_Map fl" id="busRisList_cylindrical2">
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="busRis_one hide">
        <div class="busRis_two_left fl">
            <p class="busRis_smaTitle">
                <span class="leftRed mar10 fl"></span>
                <span class="fl">智能筛选</span>
            </p>
            <ul class="busRis_twoL_list">
                <li class="busRis_twoL_listOne busRis_borB">
                    <a class="busRis_twoL_listOne_a">
                        <span class="icon-list icon-list1 fl"></span>
                        <span class="fl">省级处罚TOP10</span>
                        <span class="icon-listR icon-listRowLeft fr"></span>
                    </a>
                </li>
                <li class="busRis_twoL_listOne">
                    <a class="busRis_twoL_listOne_a busRis_twoL_listOneBg">
                        <span class="icon-list icon-list2 fl"></span>
                        <span class="fl">各省处罚列表</span>
                        <span class="icon-listR icon-listRowBot fr"></span>
                    </a>
                </li>
            </ul>
            <ul class="busRis_twoL_listT" id="riskMenu1"></ul>
        </div>
        <div class="busRis_two_right fl">
            <div class="busRisT_right_tit busRis_borB">
                <div class="fl busRisT_right_radio">
                    <span>选择：</span>
                    <input type="hidden" id="riskRadioTop1" value="1">
                    <label class="busRisTRight_radioLabel">
                        <span class="busRisT_radio busRisT_active"></span>
                        <span class="busRisT_radioSpan">按处罚金额</span>
                    </label>
                    <label class="busRisTRight_radioLabel">
                        <span class="busRisT_radio"></span>
                        <span class="busRisT_radioSpan">按处罚次数</span>
                    </label>
                </div>
                <div class="fl busRisT_right_input hide">
                    <input type="text" class="busRis_right_inpSear fl" placeholder="请输入关键词查询" id="riskComName1">
                    <input type="button" class="busRis_right_btnSear fl riskListAreaBtn" value="搜索">
                </div>
                <div class="busRisT_right_sel fr">
                    <span>年榜：</span>
                    <select id="riskYearTop1">
                        <option value="">选择</option>
                        <option value="2017">2017</option>
                        <option value="2016">2016</option>
                        <option value="2015">2015</option>
                    </select>
                    <span>月榜：</span>
                    <select id="riskMouthTop1">
                        <option value="">选择</option>
                        <option value="2017-03">2017/03</option>
                        <option value="2017-02">2017/02</option>
                        <option value="2017-01">2017/01</option>
                    </select>
                </div>
            </div>
            <div class="busRisTwoRig_contain clear" id="riskTop1"></div>
            <div class="busRisTwoRig_contain_cityList clear hide">
                <div class="busRisTwoRig_con_city">
                    <table class="compList_table">
                        <thead>
                        <tr>
                            <th style="width: 217px;"><span class="compInfor compName">企业名称</span></th>
                            <th style="width: 147px;"><span class="compInfor compUser">企业法人</span></th>
                            <th style="width: 127px;">处罚金额（万）</th>
                            <th style="width: 111px;">申绒罚（次）</th>
                            <th style="width: 110px;">财产罚（次）</th>
                            <th style="width: 110px;">行为罚（次）</th>
                            <th style="width: 110px;">人身罚（次）</th>
                        </tr>
                        </thead>
                        <tbody id="riskListArea1"></tbody>
                    </table>
                    <div class="page clearfix compList_table_page" id="page1"></div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="busRis_one hide">
        <div class="busRis_two_left fl">
            <p class="busRis_smaTitle">
                <span class="leftRed mar10 fl"></span>
                <span class="fl">智能筛选</span>
            </p>
            <ul class="busRis_twoL_list">
                <li class="busRis_twoL_listOne busRis_borB">
                    <a class="busRis_twoL_listOne_a">
                        <span class="icon-list icon-list1 fl"></span>
                        <span class="fl">省级处罚TOP10</span>
                        <span class="icon-listR icon-listRowLeft fr"></span>
                    </a>
                </li>
                <li class="busRis_twoL_listOne">
                    <a class="busRis_twoL_listOne_a busRis_twoL_listOneBg">
                        <span class="icon-list icon-list2 fl"></span>
                        <span class="fl">行业处罚列表</span>
                        <span class="icon-listR icon-listRowBot fr"></span>
                    </a>
                </li>
            </ul>
            <ul class="busRis_twoL_listT" id="riskMenu2"></ul>
        </div>
        <div class="busRis_two_right fl">
            <div class="busRisT_right_tit busRis_borB">
                <div class="fl busRisT_right_radio">
                    <span>选择：</span>
                    <input type="hidden" id="riskRadioTop2" value="1">
                    <label class="busRisTRight_radioLabel">
                        <span class="busRisT_radio busRisT_active"></span>
                        <span class="busRisT_radioSpan">按处罚金额</span>
                    </label>
                    <label class="busRisTRight_radioLabel">
                        <span class="busRisT_radio"></span>
                        <span class="busRisT_radioSpan">按处罚次数</span>
                    </label>
                </div>
                <div class="fl busRisT_right_input hide">
                    <input type="text" class="busRis_right_inpSear fl" placeholder="请输入关键词查询" id="riskComName2">
                    <input type="button" class="busRis_right_btnSear fl riskListAreaBtn" value="搜索">
                </div>
                <div class="busRisT_right_sel fr">
                    <span>年榜：</span>
                    <select id="riskYearTop2">
                        <option value="">选择</option>
                        <option value="2017">2017</option>
                        <option value="2016">2016</option>
                        <option value="2015">2015</option>
                    </select>
                    <span>月榜：</span>
                    <select id="riskMouthTop2">
                        <option value="">选择</option>
                        <option value="2017-03">2017/03</option>
                        <option value="2017-02">2017/02</option>
                        <option value="2017-01">2017/01</option>
                    </select>
                </div>
            </div>
            <div class="busRisTwoRig_contain clear" id="riskTop2"></div>
            <div class="busRisTwoRig_contain_cityList clear hide">
                <div class="busRisTwoRig_con_city">
                    <table class="compList_table">
                        <thead>
                        <tr>
                            <th style="width: 217px;"><span class="compInfor compName">企业名称</span></th>
                            <th style="width: 147px;"><span class="compInfor compUser">企业法人</span></th>
                            <th style="width: 127px;">处罚金额（万）</th>
                            <th style="width: 111px;">申绒罚（次）</th>
                            <th style="width: 110px;">财产罚（次）</th>
                            <th style="width: 110px;">行为罚（次）</th>
                            <th style="width: 110px;">人身罚（次）</th>
                        </tr>
                        </thead>
                        <tbody id="riskListArea2"></tbody>
                    </table>
                    <div class="page clearfix compList_table_page" id="page2"></div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="busRis_one hide">
        <div class="busRis_two_left fl">
            <p class="busRis_smaTitle">
                <span class="leftRed mar10 fl"></span>
                <span class="fl">智能筛选</span>
            </p>
            <ul class="busRis_twoL_list">
                <li class="busRis_twoL_listOne busRis_borB">
                    <a class="busRis_twoL_listOne_a">
                        <span class="icon-list icon-list1 fl"></span>
                        <span class="fl">省级处罚TOP10</span>
                        <span class="icon-listR icon-listRowLeft fr"></span>
                    </a>
                </li>
                <li class="busRis_twoL_listOne">
                    <a class="busRis_twoL_listOne_a busRis_twoL_listOneBg">
                        <span class="icon-list icon-list2 fl"></span>
                        <span class="fl">各省处罚列表</span>
                        <span class="icon-listR icon-listRowBot fr"></span>
                    </a>
                </li>
            </ul>
            <ul class="busRis_twoL_listT" id="riskMenu3"></ul>
        </div>
        <div class="busRis_two_right fl">
            <div class="busRisT_right_tit busRis_borB">
                <div class="fl busRisT_right_radio">
                    <span>选择：</span>
                    <input type="hidden" id="riskRadioTop3" value="1">
                    <label class="busRisTRight_radioLabel">
                        <span class="busRisT_radio busRisT_active"></span>
                        <span class="busRisT_radioSpan">按处罚金额</span>
                    </label>
                    <label class="busRisTRight_radioLabel">
                        <span class="busRisT_radio"></span>
                        <span class="busRisT_radioSpan">按处罚金额</span>
                    </label>
                </div>
                <div class="fl busRisT_right_input hide">
                    <input type="text" class="busRis_right_inpSear fl" placeholder="请输入关键词查询" id="riskComName3">
                    <input type="button" class="busRis_right_btnSear fl riskListAreaBtn" value="搜索">
                </div>
                <div class="busRisT_right_sel fr">
                    <span>年榜：</span>
                    <select id="riskYearTop3">
                        <option value="">选择</option>
                        <option value="2017">2017</option>
                        <option value="2016">2016</option>
                        <option value="2015">2015</option>
                    </select>
                    <span>月榜：</span>
                    <select id="riskMouthTop3">
                        <option value="">选择</option>
                        <option value="12">12</option>
                        <option value="11">11</option>
                        <option value="10">10</option>
                        <option value="09">09</option>
                        <option value="08">08</option>
                        <option value="07">07</option>
                        <option value="06">06</option>
                        <option value="05">05</option>
                        <option value="04">04</option>
                        <option value="03">03</option>
                        <option value="02">02</option>
                        <option value="01">01</option>
                    </select>
                </div>
            </div>
            <div class="busRisTwoRig_contain clear" id="riskTop3"></div>
            <div class="busRisTwoRig_contain_cityList clear hide">
                <div class="busRisTwoRig_con_city">
                    <table class="compList_table">
                        <thead>
                        <tr>
                            <th style="width: 217px;"><span class="compInfor compName">企业名称</span></th>
                            <th style="width: 147px;"><span class="compInfor compUser">企业法人</span></th>
                            <th style="width: 127px;">处罚金额（万）</th>
                            <th style="width: 111px;">申绒罚（次）</th>
                            <th style="width: 110px;">财产罚（次）</th>
                            <th style="width: 110px;">行为罚（次）</th>
                            <th style="width: 110px;">人身罚（次）</th>
                        </tr>
                        </thead>
                        <tbody id="riskListArea3"></tbody>
                    </table>
                    <div class="page clearfix compList_table_page" id="page3"></div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>

<div class="g_coun_foot">
    <div class="g-coun_borBott">
        <div class="g_coun_f_main">
            <div class="g_coun_f_m_top clearfix">
                <div class="g_coun_f_m_t_l fl">
                    <h2 class="g_coun_f_m_t_title fl">企业风险</h2>
                    <ul class="g_coun_f_m_t_list fl">
                        <li>关于我们</li>
                        <li>免责声明</li>
                        <li>服务协议</li>
                        <li>权利通知</li>
                        <li>意见反馈</li>
                        <li>数据服务</li>
                        <li>常见问题</li>
                        <li> 版权声明</li>
                    </ul>
                </div>
                <div class="g_coun_f_m_t_c fl">
                    <h2 class="g_coun_f_m_t_title">联系我们</h2>

                    <p>企业邮箱：xxxxxx@xxxxx.com</p>

                    <p>客服电话：888888888</p>
                </div>
                <div class="g_coun_f_m_t_r fr">
                    <div class="fl g_coun_f_m_t_r_l">
                        <p class="g_coun_f_m_t_r_l_title">微信公众号</p>

                        <p class="g_coun_f_m_t_r_l_pic"></p>
                    </div>
                    <div class="fl g_coun_f_m_t_r_l">
                        <p class="g_coun_f_m_t_r_l_title">征信查APP</p>

                        <p class="g_coun_f_m_t_r_l_pic"></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="g-coun_borTop">
        <div class="g_coun_f_main">
            <div class="g_coun_f_m_bottom">
                <p>版权所有：xxxxxxxxx@2016 JINDIDATA 京ICP备 xxxxxxx</p>

                <p>京公网安备 11010802021795号</p>
            </div>
        </div>
    </div>
</div>
<script src="${BASE_PATH}static/js/jquery-1.10.2.min.js"></script>
<script src="${BASE_PATH}static/js/echarts.min.js"></script>
<script src="${BASE_PATH}static/js/china.js"></script>
<script src="${BASE_PATH}static/js/businessRisk.js"></script>
<script>
    //企业风险榜单-总体概况
    function riskSurvey() {
        var riskSurveyUrl = '${BASE_PATH}risk/businessRiskListGeneral';//企业风险榜单-总体概况接口
        var punishtypeTit = [];
        var punishtypeNum = [];
        $.ajax({
            url: riskSurveyUrl,
            type: 'post',
            async: true,
            dataType: 'json',
            success: function (data) {
                var data1 = data.data;
                $("#punishnum").html(data1.punishnum);//累积处罚数量
                $("#punishmoney").html(data1.punishmoney);//累计处罚金额
                $("#punishnumweek").html(data1.punishnumweek);//7日新增处罚数量
                $("#punishnummonth").html(data1.punishnummonth);//30日新增处罚数量

                //全国地理区域处罚统计punishregion
                $.each(data1.punishregion, function (i, item) {
                    var json1 = {};
                    json1.name = item.title;
                    json1.value = item.number;
                    punishtypeNum.push(json1);
                })
                var myChart1 = echarts.init(document.getElementById('busRisList_Map'));
                myChart1.setOption({
                    tooltip: {
                        trigger: 'item'
                    },
                    visualMap: {
                        left: 'left',
                        itemWidth: '15',
                        itemHeight: '80',
                        text: ['高', '低'],           // 文本，默认为数值文本

                    },
                    series: [
                        {
                            name: '全国地理区域处罚统计',
                            type: 'map',
                            map: 'china',
                            mapType: 'china',
                            roam: false,
                            left: '10',
                            right: '10',
                            top: '10',
                            bottom: '20',
                            label: {
                                normal: {
                                    show: true
                                },
                                emphasis: {
                                    show: true
                                }
                            },
                            data: punishtypeNum
                        }
                    ]
                });
                //全国行政处罚类型惩戒占比punishtype
                punishtypeTit = [];
                punishtypeNum = [];
                $.each(data1.punishtype, function (j, jtem) {
                    var json1 = {};
                    punishtypeTit.push(jtem.title);
                    json1.value = jtem.number;
                    json1.name = jtem.title;
                    punishtypeNum.push(json1);
                });
                myChart2.setOption({
                    legend: {
                        data: punishtypeTit
                    },
                    series: [
                        {
                            data: punishtypeNum
                        }
                    ]
                });
                //全国行政单位处罚punishstra
                punishtypeTit = [];
                punishtypeNum = [];
                $.each(data1.punishstra, function (k, ktem) {
                    punishtypeTit.push(ktem.title);
                    punishtypeNum.push(ktem.number);
                })

                myChart3.setOption({
                    yAxis: {
                        data: punishtypeTit
                    },
                    series: [
                        {
                            itemStyle: {
                                normal: {
                                    color: '#c90000'
                                }
                            },
                            data: punishtypeNum
                        }
                    ]
                });
                //全国行业分布处罚punishdist
                punishtypeTit = [];
                punishtypeNum = [];
                $.each(data1.punishdist, function (l, ltem) {
                    var json1 = {};
                    punishtypeTit.push(ltem.title);
                    json1.value = ltem.number;
                    json1.name = ltem.title;
                    punishtypeNum.push(json1);
                })
                myChart4.setOption({
                    legend: {
                        data: punishtypeTit
                    },
                    series: [
                        {
                            data: punishtypeNum
                        }
                    ]
                });
                //全国企业处罚综合punishcomp
                punishtypeTit = [];
                punishtypeNum = [];
                $.each(data1.punishcomp, function (t, ttem) {
                    punishtypeTit.push(ttem.title);
                    punishtypeNum.push(ttem.number);
                })
                myChart5.setOption({
                    yAxis: {
                        data: punishtypeTit
                    },
                    series: [
                        {
                            itemStyle: {
                                normal: {
                                    color: '#3f8ac4'
                                }
                            },
                            data: punishtypeNum
                        }
                    ]
                });
                //上市公司处罚综合punishlisted
                punishtypeTit = [];
                punishtypeNum = [];
                $.each(data1.punishcomp, function (o, otem) {
                    punishtypeTit.push(otem.title);
                    punishtypeNum.push(otem.number);
                })
                myChart6.setOption({
                    yAxis: {
                        data: punishtypeTit
                    },
                    series: [
                        {
                            itemStyle: {
                                normal: {
                                    color: '#afd4c2'
                                }
                            },
                            data: punishtypeNum
                        }
                    ]
                });
            }
        });
    }

    riskSurvey();//企业风险榜单-总体概况
    //企业风险榜单-地区、行业、行政 top10
    function riskList() {
        var spage = $("#spage").val();//获取当前页面
        var type = $("#riskRadioTop" + spage).val();//获取当前页面的处罚类型
        var year = $("#riskYearTop" + spage).val();//获取当前页面的年
        var month = $("#riskMouthTop" + spage).val();//获取当前页面的月
        var data = {
            spage: spage,//查询页面 1 地区 2 行业 3 行政
            type: type,//处罚类型 1 处罚金额 2 处罚次数
            year: year,//年
            month: month//月
        };
        var riskListUrl = '${BASE_PATH}risk/businessRiskListTopTen';//企业风险榜单-地区、行业、行政 top10接口
        $.ajax({
            url: riskListUrl,
            type: 'post',
            async: true,
            data: data,
            dataType: 'json',
            success: function (data) {
                if (data.code == -1) {
                    alert("查询失败");
                    return;
                }
                var data1 = data.data;
                var html = "";
                var type1 = "";
                if (type == 1) {
                    type1 = '金额（万）';
                } else {
                    type1 = '金额（次）';
                }
                console.log(data);
                $.each(data1, function (i, item) {
                    var ii = parseInt(i) + 1;
                    html += //
                            '<div class="busRisTwoRig_con top' + ii + ' fl">' +
                            '	<p class="busRis_smaTitle">' +
                            '		<span class="leftRed mar20 fl"></span>' +
                            '		<span class="fl">' + item.title + '榜</span>' +
                            '	</p>' +
                            '	<div class="busRisTwoRig_conL">' +
                            '		<div class="busRisTwoRig_conListT">' +
                            '			<span class="fl busRisTwoRig_conListTit busRisTwoRig_conListTit1">企业名称</span>' +
                            '			<span class="fl busRisTwoRig_conListTit busRisTwoRig_conListTit2">企业法人</span>' +
                            '			<span class="fl busRisTwoRig_conListTit busRisTwoRig_conListTit3">' + type1 + '</span>' +
                            '		</div>';
                    if (item.punishtop != "") {
                        $.each(item.punishtop, function (j, jtem) {
                            var num = "";
                            var jj = parseInt(j) + 1;
                            if (jj <= 3) {
                                num = 1;
                            } else {
                                num = 2;
                            }
                            html +=//
                                    '		<div class="clear busRisTwoRig_conList">' +
                                    '			<span class="fl busRisTwoRig_conL_num busRisTwoRig_conL_num' + num + '">' + jj + '</span>' +
                                    '			<p class="fl busRisTwoRig_conL_con">' +
                                    '				<span class="fl busRisTwoRig_conL_con1" onclick="jumpDetail(' + jtem.id + ')">' + jtem.company + '</span>' +
                                    '				<span class="busRisTwoRig_conL_con2">' + jtem.corporation + '</span>' +
                                    '				<span class="busRisTwoRig_conL_con3">' + jtem.moneyortime + '</span>' +
                                    '			</p>' +
                                    '		</div>';
                        })
                    }
                    html +=//
                            '	</div>' +
                            '</div>';
                })
                $("#riskTop" + spage).html(html);
            }
        })
    }
    //企业风险榜单-各地区、行业、行政 处罚菜单
    function riskMenuArea(spage) {
        var data = {
            spage: spage//查询页面 1 地区 2 行业 3 行政
        };
        var riskMenuUrl = '${BASE_PATH}risk/businessRiskListMenu';//企业风险榜单-各地区、行业、行政 处罚菜单接口
        $.ajax({
            url: riskMenuUrl,
            type: 'post',
            async: true,
            data: data,
            dataType: 'json',
            success: function (data) {
                if (data.code == -1) {
                    alert("查询失败");
                    return;
                }
                var html = "";
                var len = data.data.length - 1;
                $.each(data.data, function (i, item) {
                    if (i == len) {
                        html +=//
                                '<li id="' + item.id + '">' +
                                '	<a class="busRis_twoL_listT_a fl">' +
                                '		<span class="fl busRis_twoL_city">' + item.title + '</span>' +
                                '		<span class="fr">' +
                                '			<span class="fl busRis_twoL_listT_num">' + item.number + '</span>' +
                                '			<span class="fl busRis_twoL_yuan">万元</span>' +
                                '		</span>' +
                                '	</a>' +
                                '</li>';
                    } else {
                        html +=//
                                '<li id="' + item.id + '">' +
                                '	<a class="busRis_twoL_listT_a fl">' +
                                '		<span class="fl busRis_twoL_city">' + item.title + '</span>' +
                                '		<span class="fr">' +
                                '			<span class="fl busRis_twoL_listT_num">' + item.number + '</span>' +
                                '			<span class="fl busRis_twoL_yuan">万元</span>' +
                                '		</span>' +
                                '	</a>' +
                                '	<span class="icon-list-cri fl"></span>' +
                                '	<span class="icon-list-line fl"></span>' +
                                '</li>';
                    }
                })
                $("#riskMenu" + spage).html(html);
            }
        })
    }
    //企业风险榜单-各地区、行业、行政 处罚列表接口
    function riskListArea(order, id) {
        var spage = $("#spage").val();//获取当前页面
        var company = $("#riskComName" + spage).val();//企业名称
        var year = $("#riskYearTop" + spage).val();//获取当前页面的年
        var month = $("#riskMouthTop" + spage).val();//获取当前页面的月
        var pageNo = order;//查询第几页数
        var data = {
            spage: spage,//查询页面 1 地区 2 行业 3 行政
            id: id,//处罚菜单主键id
            company: company,
            year: year,//年
            month: month,//月
            pageNo: pageNo,
            pageSize: 15
        };
        var riskListAreaUrl = '${BASE_PATH}risk/businessRiskListView';//企业风险榜单-各地区、行业、行政 处罚列表接口
        $.ajax({
            url: riskListAreaUrl,
            type: 'post',
            async: true,
            data: data,
            dataType: 'json',
            success: function (data) {
                if (data.code == -1) {
                    alert("查询失败");
                    return;
                }
                var html = "";
                //分页
                var pageHtml = '<ul class="fl">';
                var page = Math.ceil(data.totalRow / data.pageSize);
                var currPageNo = data.pageNumber;
                var minPageNo = 1;
                var maxPageNo = page;
                if (!pageNo || pageNo == null || pageNo == "") {
                    pageNo = 1;
                } else if (pageNo > page) {
                    pageNo = page;
                }
                /* if (maxPageNo > 10) {
                 if (pageNo > 5) {
                 if (maxPageNo - pageNo <= 4) {
                 minPageNo = maxPageNo - 9;
                 } else {
                 minPageNo = pageNo - 5;
                 maxPageNo = pageNo + 4;
                 }
                 } else {
                 maxPageNo = 10;
                 }
                 } */
                console.log(data);
                for (var int = 1; int <= page; int++) {
                    // 获取页码和当前页码
                    if (data.pageNumber == int) {
                        pageHtml += "<li class='page_action'>" + int + "</li>";
                    } else {
                        if (int >= minPageNo && int <= maxPageNo) {
                            pageHtml += "<li onclick='riskListArea(" + int + "," + id + ")'>" + int + "</li>";
                        }
                    }
                }
                // 判断是否是第一页
                if (data.pageNumber != 1) {
                    pageHtml += "<li onclick='riskListArea(" + (data.pageNumber - 1) + "," + id + ")'>&lt;</li>";
                }
                // 页数是否已加载完成
                // 判断是否是最后一页
                if (data.pageNumber != page) {
                    pageHtml += "<li onclick='riskListArea(" + (parseInt(data.pageNumber) + 1) + "," + id + ")'>&gt;</li>";
                }
                pageHtml +=//
                        '	</ul>' +
                        '	<p class="fr page_all">共&nbsp;<span class="page_num">' + data.totalRow + '</span>&nbsp;条记录</p>';
                $.each(data.data, function (i, item) {
                    var ii = parseInt(i) + 1;
                    var claNum = "";
                    if (ii <= 3) {
                        claNum = '';
                    } else {
                        claNum = 'compNum1';
                    }
                    html +=//
                            '<tr>' +
                            '	<td>' +
                            '		<span class="compNum ' + claNum + ' fl">' + ii + '</span>' +
                            '		<span class="fl" onclick="jumpDetail(' + item.id + ')">' + item.company + '</span>' +
                            '	</td>' +
                            '	<td>' + item.corporation + '</td>' +
                            '	<td>' + item.punishmoney + '</td>' +
                            '	<td>' + item.admonition + '</td>' +
                            '	<td>' + item.property + '</td>' +
                            '	<td>' + item.behavior + '</td>' +
                            '	<td>' + item.person + '</td>' +
                            '</tr>';
                })
                $("#page" + spage).html(pageHtml)
                $("#riskListArea" + spage).html(html);
            }
        })
    }

    //跳转页面
    function jumpDetail(id) {
        window.location.href = '${BASE_PATH}searchDetail.jsp?id=' + id;
    }
</script>
<script>
    $(function () {
        riskMenuArea(1);//企业风险榜单-各地区、行业、行政 处罚菜单
        riskMenuArea(2);//企业风险榜单-各地区、行业、行政 处罚菜单
        riskMenuArea(3);//企业风险榜单-各地区、行业、行政 处罚菜单
    })
</script>
</body>
</html>